import request from '@utils/request';
import { service } from '@utils/service'

export async function getModuleList(params: any) {
  return request(`${service.SERVICE_ROOT}/module/list`, {
    method: 'POST',
    data: {
      ...params
    }
  })
}

export async function deleteModule(params: any) {
  return request(`${service.SERVICE_ROOT}/module/delete`, {
    method: 'DELETE',
    data: {
      ...params
    }
  })
}

export async function updateModule(params: any) {
  return request(`${service.SERVICE_ROOT}/module/update`, {
    method: 'PUT',
    data: {
      ...params
    }
  })
}

export async function addModule(params: any) {
  return request(`${service.SERVICE_ROOT}/module/add`, {
    method: 'POST',
    data: {
      ...params
    }
  })
}
